﻿@model JuniorProject.Models.Employee.EmployeeJobToQuestionModel

@{
    ViewBag.Title = "MapQuestionsToJob";
}

@section scripts
{
    <link href="@Url.Content("~/Content/themes/base/jquery-tablesorter.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.tablesorter.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('table').tablesorter({ headers: { 1: { sorter: false} }, sortList: [[0, 0]] });
        });
    </script>
}

<h2>Map Questions To Job #@Model.JobID</h2>

@using (Html.BeginForm(new { jobID = Model.JobID }))
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>EmployeeJobToQuestionModel</legend>

            <table id="table" class="tablesorter">
                <thead>
                    <tr>
                        <th>
                            @Html.DisplayNameFor(model => model.Questions[0].Question)
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @Html.EditorFor(m => m.Questions)
                </tbody>
            </table>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<p>
    @if (!ViewBag.NewJob)
    {
        @Html.ActionLink("Back to List", "Jobs")
    }
</p>
<p>
    @Html.Partial("_EmployeeBottomNavBar", ViewData["AccessLevel"])
</p>